<template>
  <div class="pageHead">
      <div class="top">
        <div class="info">
          <strong>고객센터</strong>
          <p>무엇을<b>도와드릴까요?</b></p>
        </div>
        <img class="pic" src="@images/service/topPic.jpg" alt="">
      </div>
      <div class="tab">
        <router-link :class="tab==1&&'active'" to="/service/notice">공지사항</router-link>
        <router-link :class="tab==2&&'active'" to="/service/FQA">자주묻는질문</router-link>
        <a href="javascript:;" target="_self" :class="tab==3&&'active'" @click="checkAuth('/service/QNA')">질문과 답변</a>
      </div>
  </div>
</template>

<script>
import { mapState, mapActions } from 'vuex'
export default {
  name:'helpHeader',
  components:{},
  props:[],
  data(){
    return {
    }
  },
  props:['tab'],
  computed:{
    ...mapState(['userInfo'])
  },
  created(){},
  mounted(){},
  methods:{
    checkAuth(path){
      if(this.userInfo){
        this.$router.push(path)
      }else{
        this.$alert('로그인 사용자만 확인이 가능합니다.', '알림', {
            confirmButtonText: '확인'
        })
      }      
    }
  },
  watch:{}
}
</script>